package com.app.ctzoverseas.network.repo

import com.app.ctzoverseas.network.http.AddressNetwork
import com.app.ctzoverseas.network.http.GoodsNetwork
import com.app.ctzoverseas.network.http.LoginNetwork
import com.app.ctzoverseas.network.http.OrderNetwork
import com.cardetective.shopcar.network.model.AddCarPost
import com.cardetective.shopcar.network.model.BindMobilePost
import com.cardetective.shopcar.network.model.LoginPost

class OrderRepo(private val network: OrderNetwork) {

    fun getOrderList(tag:String,pageNum:Int,pageSize:Int) = network.getOrderList(tag, pageNum, pageSize)
    fun getOrderDetail(orderSn:String) = network.getOrderDetail(orderSn)
    fun getRefundReasons() = network.getRefundReasons()
    fun submitRefundReasons(orderSn: String) = network.submitRefundReasons(orderSn)

    companion object {

        @Volatile
        private var INSTANCE: OrderRepo? = null
        fun getInstance(netWork: OrderNetwork) =
            INSTANCE ?: synchronized(this) {
                INSTANCE ?: OrderRepo(netWork).also { INSTANCE = it }
            }
    }
}